
//
//  InstallationDetailInstallAddress.swift
//  ezyform
//
//  Created by MoennigQ on 12/12/2016.
//  Copyright © 2016 Client.Solution Pty Ltd. All rights reserved.
//

import UIKit
import HandyJSON
class InstallationDetailInstallAddress: HandyJSON {
    var property_type: String = ""
    var single_or_multi_story: String = ""
    var installation_address: String = ""
    var special_address: String = ""
    //优先显示specail address
    var final_install_address: String {
        if special_address == "" {
            return installation_address
        }else{
            return special_address
        }
    }
    //google api转换的经纬度
    var location = LocationModel()

    var unit_type_value: String = ""
    var unit_type: String = ""
    var unit_number: String = ""
    var street_number: String = ""
    var street_name: String = ""
    var street_type: String = ""
    var street_type_value: String = ""
    var suburb: String = ""
    var state: String = ""
    var post_code: String = ""
    //retailer填写的经纬度
    var latitude: String = ""
    var longitude: String = ""
    var nmi: String = ""
    var grid_connection_application_ref_no: String = ""
    var isNMIRequired: Bool {
        return ["NSW", "VIC", "QLD", "SA", "TAS","ACT"].contains(state)
    }
    //
    var same_as_postal: Bool = false
    var address_text: String = ""
    var address_id: String = ""
    var address_type_value: String = ""
    var address_type: String = ""
    //
    required init(){}
}
